<template>
  <div>
     <!-- 轮播图组件 -->
    <el-carousel indicator-position="outside" type="card" height="300px">
      <el-carousel-item v-for="item in imgs" :key="item">
        <el-image :src="item" style="height: 300px;" fit="contain"></el-image>
      </el-carousel-item>
    </el-carousel>
  </div>
</template>

<script>
//有简便点的办法吗
    // import Img from '../assets/indeximags';
    import Img1 from '../assets/indeximags/img_01.jpg';
    import Img2 from '../assets/indeximags/img_02.jpg';
    import Img3 from '../assets/indeximags/img_03.jpg';
    import Img4 from '../assets/indeximags/img_04.jpg';
    import Img5 from '../assets/indeximags/img_05.jpg';
    import Img6 from '../assets/indeximags/img_06.jpg';
    import Img7 from '../assets/indeximags/img_07.jpg';
    import Img8 from '../assets/indeximags/img_08.jpg';
    export default {
        name: 'Index',
        data(){
            return {
                imgs:[Img1,Img2,Img3,Img4,Img5,Img6,Img7,Img8]
            }
        }
    }
</script scope>

<style>
</style>